package com.lg.product.service.impl;

import com.lg.product.entity.CategoryBrand;
import com.lg.product.mapper.CategoryBrandMapper;
import com.lg.product.service.ICategoryBrandService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品分类和品牌的中间表，两者是多对多关系 服务实现类
 * </p>
 *
 * @author song
 * @since 2020-07-22
 */
@Service
public class CategoryBrandServiceImpl extends ServiceImpl<CategoryBrandMapper, CategoryBrand> implements ICategoryBrandService {


    /**
     * 根据品牌id删除 中间表
     * @param id
     * @return
     */
    public int deleteCategoryBrand(Long id){
        /*QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("brand_id",id);*/
        baseMapper.deleteCategoryBrand(id);
        return 1;
    }

}
